﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using GAE_PI.Exceptions;
using GAE_PI.Models;

namespace GAE_PI.Controllers
{
    public class ListeElevesController : Controller
    {
        //
        // GET: /ListeEleves/

        public ActionResult ListeEleves()
        {
            try
            {
                return View(DBModel.getDBM().getEleves());
            }
            catch(GAEException ex)
            {
                ex.errorModel.ControllerName = "ListeEleve";
                ex.errorModel.ControllerAction = "ListeEleve";
                return View("Error", ex.errorModel);
            }
            
        }

    }
}
